package com.ruoyi.project.er.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.project.er.domain.PaeaErGrade;
import com.ruoyi.project.er.mapper.PaeaErGradeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.er.service.IPaeaErGradeService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 风险等级定义Service业务层处理
 *
 * @author XQ.XU
 * @date 2020-03-26
 */
@Service
public class PaeaErGradeServiceImpl extends ServiceImpl<PaeaErGradeMapper, PaeaErGrade> implements IPaeaErGradeService
{
    @Autowired
    private PaeaErGradeMapper paeaErGradeMapper;

    /**
     * 查询风险等级定义
     *
     * @param id 风险等级定义ID
     * @return 风险等级定义
     */
    @Override
    public PaeaErGrade selectPaeaErGradeById(String id)
    {
        return paeaErGradeMapper.selectPaeaErGradeById(id);
    }

    /**
     * 查询风险等级定义列表
     *
     * @param paeaErGrade 风险等级定义
     * @return 风险等级定义
     */
    @Override
    public List<PaeaErGrade> selectPaeaErGradeList(PaeaErGrade paeaErGrade)
    {
        return paeaErGradeMapper.selectPaeaErGradeList(paeaErGrade);
    }

    /**
     * 新增风险等级定义
     *
     * @param paeaErGrade 风险等级定义
     * @return 结果
     */
    @Override
    public int insertPaeaErGrade(PaeaErGrade paeaErGrade)
    {
        return paeaErGradeMapper.insertPaeaErGrade(paeaErGrade);
    }

    /**
     * 修改风险等级定义
     *
     * @param paeaErGrade 风险等级定义
     * @return 结果
     */
    @Override
    public int updatePaeaErGrade(PaeaErGrade paeaErGrade)
    {
        return paeaErGradeMapper.updatePaeaErGrade(paeaErGrade);
    }

    /**
     * 删除风险等级定义对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePaeaErGradeByIds(String ids)
    {
        return paeaErGradeMapper.deletePaeaErGradeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除风险等级定义信息
     *
     * @param id 风险等级定义ID
     * @return 结果
     */
    @Override
    public int deletePaeaErGradeById(String id)
    {
        return paeaErGradeMapper.deletePaeaErGradeById(id);
    }
}
